/**
 * 初始化字典详情对话框
 */
var VipTypeEditDlg = {
    name: $("#name").val(),
    price: $("#price").val(),
    days:$("#days").val()
};

/**
 * 关闭此对话框
 */
VipTypeEditDlg.close = function () {
    parent.layer.close(window.parent.Type.layerIndex);
};


/**
 * 提交添加字典
 */
VipTypeEditDlg.addSubmit = function () {
    //提交信息
    var name = $("#name").val();
    var id = $("#updateId").val();
    var price = $("#price").val();
    var days = $("#days").val();
    var ajax = new $ax(Feng.ctxPath + "/vipType/update", function (data) {
        Feng.success("修改成功!");
        window.parent.Type.table.refresh();
        VipTypeEditDlg.close();
    }, function (data) {
        Feng.error("添加失败!" + data.responseJSON.message + "!");
    });
    ajax.set('id',id);
    ajax.set('price',price);
    ajax.set('name',name);
    ajax.set('days',days);
    ajax.start();
};
